Domain Name System
Architecture, Hierarchy, and Resolution Protocols
Computers communicate using IP addresses (e.g., 192.0.2.1), but humans memorize names (e.g., google.com).
DNS is the phonebook of the Internet:
A single file HOSTS.TXT maintained by SRI-NIC. Every computer had to manually download this file via FTP. Scalability was impossible.
Paul Mockapetris invented DNS (RFC 1034/1035). The system is:
The DNS ecosystem rests on three fundamental pillars:
The hierarchical tree structure of data and domain names.
Server programs that hold "Zones" of data and answer queries.
Client-side programs that query the system to get an answer.
DNS is an inverted tree starting at the Root (.).
.com, .org, .fr.google, amazon.www, mail, dev.A complete name is a FQDN (Fully Qualified Domain Name).
There are 13 logical root server identities, named A through M (e.g., a.root-servers.net).
Managed by organizations like Verisign, NASA, RIPE NCC, etc.
There are hundreds of physical servers. Anycast routing directs queries to the closest physical server for speed and redundancy.
A zone is a physical file containing data for a specific slice of the DNS tree, managed by a specific administrator.
The act of transferring responsibility for a subdomain to another nameserver.
Root delegates .com to Verisign. Verisign delegates google.com to Google.
The authoritative source. This is the only server where the admin makes changes (Read/Write).
Read-only backup. It downloads data via Zone Transfer (AXFR).
Crucial for redundancy and load balancing.
Client to Resolver: "Go find the IP for me."
Resolver to Hierarchy: "I will ask each level step-by-step."
To prevent global network collapse, answers are stored temporarily (Caching).
A value in seconds dictating how long a record stays in cache.
| Type | Name | Description |
|---|---|---|
A |
Address | Maps hostname to IPv4 (32-bit). |
AAAA |
Quad A | Maps hostname to IPv6 (128-bit). |
CNAME |
Canonical Name | Alias to another name. |
MX |
Mail Exchange | Mail server priority and location. |
NS |
Name Server | Delegates a zone to an authoritative server. |
TXT |
Text | Security verification (SPF, DKIM). |
Original DNS was unencrypted (UDP 53), vulnerable to Spoofing and Cache Poisoning.